Systems and methods for resource sharing between two resource allocation systems

ABSTRACT

In various example embodiments, a system and method for managing a server cluster are provided. An example method may include scheduling a first job on a first node, using a first resource manager, establishing a service for a second resource manager on a second node, wherein the service is allocated node resources of the second node, and attempting to schedule a second job on the first node, using the first resource manager. The method may include preempting the service on the second node, using the second resource manager, in response to the attempt to schedule the second job on the first node, and deallocating the node resources of the second node from the service. The method may include advertising, using a node manager of the first resource manager, available node resources of the second node, and scheduling the second job on the second node, using the first resource manager.

CLAIM OF PRIORITY

Pursuant to 35 U.S.C. §119(a), this patent application claims thebenefit of India Provisional Patent Application Serial Number2591/DEL/2014, titled “SYSTEMS AND METHODS FOR RESOURCE SHARING BETWEENTWO RESOURCE ALLOCATION SYSTEMS,” filed on Sep. 10, 2014, which ishereby incorporated by reference herein in its entirety.

BACKGROUND

In various examples, datacenters may use resource allocation systems tomanage system resources. For example, a server may use a resourceallocation system to direct requests for data access or page access toavailable servers. In various examples, a single task may be distributedacross many computers in a datacenter or across datacenters.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings, which are not necessarily drawn to scale, like numeralsmay describe similar components in different views. Like numerals havingdifferent letter suffixes may represent different instances of similarcomponents. The drawings illustrate generally, by way of example, butnot by way of limitation, various embodiments discussed in the presentdocument.

FIG. 1 is an example block diagram illustrating two resource managementsystems, according to example embodiments;

FIG. 2 is a diagrammatic representation of a cgroups hierarchy,according to example embodiments;

FIG. 3 is a diagrammatic representation of task management, according toexample embodiments;

FIG. 4 is a diagrammatic representation of a node, according to exampleembodiments;

FIG. 5 is an example block diagram illustrating a dual resource managerintegrated system, according to example embodiments;

FIGS. 6-8 are example operations in a first process flow of resourceallocation, according to example embodiments;

FIGS. 9-13 are example operations in a second process flow of resourceallocation, according to example embodiments; and

FIG. 14 is a block diagram of machine in the example form of a computersystem within which a set instructions, for causing the machine toperform any one or more of the methodologies discussed herein, may beexecuted, according to example embodiments.

DETAILED DESCRIPTION

Currently, datacenters may use a single resource allocation system tomanage system resources. In some datacenters, multiple resourceallocation systems may be used to process tasks. Running two resourcemanagers independently may result in a statically partitioneddatacenter. This may be undesirable because resources may be confined tobeing used under a single resource allocation system and the resourcesmay not be easily shared.

One type of resource allocation system, Mesos, supports both servicesand analytics workloads well. Mesos is a two level scheduler and clustermanager. Another resource allocation system, YARN is often the defaultchoice for users—such as users migrating from an environment in whichHadoop 1.0 is utilized for analytics/data processing. YARN is a resourcenegotiator and a single level scheduler that supports different types ofanalytical jobs. YARN is commonly used in a Hadoop 2.0 setup and acts asa replacement for the cluster resource management aspects of MapReduce.MapReduce was used as a cluster resource management in Hadoop 1.0setups, and MapReduce is used for data processing in both Hadoop 1.0 and2.0 setups (among other data processors in Hadoop 2.0).

Resource sharing between two resource allocation systems may includeopen architecture that allows a Mesos resource allocation system and aYARN resource allocation system to co-exist and share resources. Otherresource management systems may also benefit from the shared allocationexamples described herein. In an example, Mesos may be the resourcemanager for the datacenter. Sharing resources between two resourceallocation systems may improve overall cluster utilization and may avoidstatically partitioning resources amongst two separate clusters/resourcemanagers.

As stated above, running two resource managers independently may resultin a statically partitioned datacenter. In an example, FIG. 1illustrates a datacenter 100, using a Mesos resource manager 102 and aYARN resource manager 104. In an example, the datacenter 100 hasstatically partitioned nodes, such as node 106 and node 108 that may notshare resources with more than one resource manager. For example, node106 is illustrated under the Mesos framework with the Mesos resourcemanager 102 and it may not be used under the YARN resource manager 104.Similarly, node 108 is illustrated under the YARN resource manager 104and may not be used under the Mesos resource manager 102. The staticallypartitioned datacenter 100 may not allow for optimal allocation ofresources. For example, if the Mesos resource manager 102 wantsadditional resources it may not use the resources on node 108.

In various examples, a non-intrusive open architecture that combinesresource managers (e.g., Mesos and YARN) to allocate system resources isdescribed. In an example, the resource managers may be Mesos and YARNand the combination may not modify Mesos or YARN protocols. By notmodifying Mesos or YARN protocols, future upgrade paths for Mesos andYARN may be more easily implemented, and the combined resource managersmay be available for future upgrades as well. Another advantage of notmodifying YARN protocols is that YARN/Hadoop cluster certifications byvendors may be made easier. The combined resource managers may leveragescheduling information from YARN from an external Control Plane to makedecisions about providing or rescinding resources to YARN via Mesos.Other benefits of using the non-intrusive open architecture may bedetermined by analyzing the present disclosure.

In an example, a cluster is a group of resources in a datacenter, and anode within a cluster is a location where tasks are run. These tasks maybe launched with help of a daemon which resides inside the node. Forexample, a daemon in the case of Mesos, is called a Mesos Slave, and inthe case of YARN, is called a Node Manager.

In an example, a control groups (cgroups) Linux kernel feature allowsaggregating or partitioning a set of tasks and future children tasksinto hierarchical groups with respect to one or more subsystems. Forexample, when cgroups is enabled for a Central Processing Unit (CPU)subsystem, a task that is launched by a daemon (e.g., Mesos Slave) maygo under a hierarchy, such as a parent task identification(<parent-task-id>).

FIG. 2 shows a diagrammatic representation of a cgroups hierarchy 200where the <parent-task-id> is /sys/fs/cgroup/cpu/mesos/. During thelifecycle of the task, if the task launches one or more child tasks, thechild tasks may be mounted in the cgroups hierarchy 200 under the parenttask and may be configured to use the same amount of resources as theparent task. For example, the hierarchy for the child tasks withidentification 1 and 2 may appear as:/sys/fs/cgroup/cpu/mesos/mesos-id/hadoop-yarn/C1 and/sys/fs/cgroup/cpu/mesos/mesos-id/hadoop-yarn/C2, where mesos-id, C1,and C2 may be given names specific to their locations or localidentifications.

In an example, cgroups for Mesos Slave and YARN Node Manager may beenabled. For example, to enable cgroups for Mesos Slave, it may bestarted with a flag, such as: isolation=cgroups/cpu,cgroups/mem. Toenable cgroups for YARN Node Manager, an addition may be made toyarn-site.xml for the YARN Node Manager. A configuration may mountYARN's cgroup hierarchy under Mesos, such as by using the examplefollowing code integrated with a‘yarn.modemanager.linux-container-executor.cgroups.hierarchy’ property:

<!-- cgroups --> <property> <description>who will execute(launch) thecontainers.</description><name>yarn.nodemanager.container-executor.class</name><value>org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor</value> </property> <property> <description>The class which should help theLCE handle resources.</description><name>yarn.nodemanager.linux-container-executor.resources-handler.class</name><value>org.apache.hadoop.yarn.server.nodemanager.util.CgroupsLCEResourcesHandler</value> </property> <property><name>yarn.nodemanager.linux-container-executor.cgroups.hierarchy</name><value>mesos/node-manager-task-id/hadoop-yarn</value> </property><property><name>yarn.nodemanager.linux-container-executor.cgroups.mount</name><value>true</value> </property> <property><name>yarn.nodemanager.linux-container-executor.cgroups.mount-path</name><value>/sys/fs/cgroup</value> </property> <property><name>yarn.nodemanager.linux-container-executor.group</name><value>root</value> </property> <property><name>yarn.nodemanager.linux-container-executor.path</name><value>/usr/local/hadoop/bin/container-executor</value> </property>

In an example, FIG. 3 is a diagram diagrammatic representation of taskmanagement for a datacenter 300. The datacenter 300 may include a firstresource manager 302 and a second resource manager 304 (e.g., Mesos andYARN). The datacenter 300 may include nodes 306, 308, and 310. In anexample, node 306 has only Mesos tasks scheduled, node 308 has only YARNtasks scheduled, and node 310 has both Mesos tasks and YARN tasksscheduled. In an example, one way to avoid static partitioning and toenable resource sharing when running two resource managers is to let aprimary resource manager be in control of the datacenter's resources. Asecondary resource manager may then manage a subset of resources, andthe primary resource manager may allocate the subset of resources to thesecondary resource manager. In an example, Mesos may be used as theprimary resource manager for the datacenter. In an example, YARN may beused as the secondary resource manager for the datacenter. Asillustrated in FIG. 3, Mesos or YARN may schedule a task on any node.

In various examples, Mesos Slave and YARN's Node Manager are processesthat run on a host Operating System (OS), and advertise availableresources to a Mesos resource manager (Master) and a YARN resourcemanager respectively. Both processes may be configured to advertise asubset of resources. Using cgroups and the advertisement of a subset ofresources may allow a Mesos Slave and a YARN Node Manager to co-exist ona node, such as illustrated in FIG. 4.

In an example, FIG. 4 is a diagrammatic representation of a node 400including a first daemon of a first resource manager (e.g., a MesosSlave 402 of a Mesos resource manager) controlling a second daemon of asecond resource manager (e.g., a YARN Node Manager 404 of a YARNresource manager). In an example, the Mesos Slave 402 may advertise allof a node's resources to a Mesos resource manager (Master). For examplea Mesos Slave 402 may advertise eight CPUs and 16 GB RAM as in FIG. 4.In this example, a YARN Node Manager 404 may be a Mesos task. The YARNNode Manager 404 Mesos task may be allotted a portion of the totalresources advertised by the Mesos Slave 402, such as an allocation offour CPUs and eight GB RAM, and the Node Manager may be configured toadvertise three CPUs and seven GB RAM.

The YARN Node Manager 404 may also be configured to mount YARNcontainers under the cgroup hierarchy as a Mesos task. For example, thecontainers may be mounted as:/sys/fs/cgroup/cpu/mesos/node-manager-task-id/container-1. This mayallow the Mesos Slave 402 and the YARN Node Manager 404 to co-exist onthe same node, in a non-intrusive way. The illustrated CPUs andavailable memory in FIG. 4 and throughout this disclosure are forillustration purposes—other amounts of CPUs or memory may be utilizedwithout departing from the scope of this disclosure.

FIG. 5 is an example block diagram illustrating a dual resource managerintegrated system 500. In FIG. 5, a Control Plane 502 may be a modulethat makes decisions for managing resources between a YARN resourcemanager 506 and a Mesos resource manager 504. A Mesos resource manager(e.g., Framework and Master) may be a module that manages and executesjobs on a cluster.

In an example, an abstraction, such as a job may be provided. The jobmay be defined by an application, such as Apache Aurora or otherscheduler. A job may include a collection of tasks that run on one ormore nodes managed by a Mesos Slave 510. The Mesos Slave 510 may run aYARN Node Manager 512 as a task. The YARN Node Manager 512 may run ajob, such as job C1 514 or job C2 516 using node resources of the node508.

In an example method to be run on the system 500, the Control Plane 502may instruct the Mesos resource manager 504 to, and the Mesos resourcemanager 504 may, launch the YARN Node Manager 512 as a task under theMesos Slave 510. The Control Plane 502 may request Apache Aurora toincrease the number of running YARN Node Manager instances. Aurora maypass the configuration and task launch information to the Mesos resourcemanager 504. The YARN Node Manager 512 may advertise available noderesources on the node 508 to the YARN resource manager 506. The YARNresource manager 506 may launch containers to schedule jobs C1 514 andC2 516 on the node 508 under the YARN Node Manager 512 running as a taskunder the Mesos Slave 510.

In various examples, Mesos resource manager 504 (e.g., Master) may bemanage the Mesos Slave(s) 510 or frameworks. The Mesos Slave 510 may bea daemon that runs on a node and is responsible for advertisingavailable resources and launching tasks on a node. The YARN resourcemanager 506 may be a system similar to Mesos Master which manages theYARN Node Manager(s) 512 or YARN AppMasters. The YARN Node Manager 512may be a daemon similar to the Mesos Slave 510 that is responsible foradvertising resources and launching task containers on a node. In anexample, the node 508 in a cluster may have the Mesos Slave 510 daemonand the YARN Node Manager 512 daemon installed. The Mesos Slave 510daemon may be started on the node 508 and may advertise all availableresources to the Mesos resource manager 504.

The YARN Node Manager 512 may be launched as a task under the MesosSlave 510. Apache Aurora may be responsible for launching and managingthe YARN Node Manager 512 instance on node 508. For example, in thesystem 500, the YARN Node Manager 512 is allotted 2.5 CPU and 2.5 GBRAM. The YARN Node Manager 512, upon startup, advertises configuredresources to the YARN resource manager 506. In the example in FIG. 5,two CPU and two GB RAM are advertised. The YARN resource manager 506 maylaunch containers via the YARN Node Manager 512. The launched containersmay be mounted under the configured cgroup hierarchy, as explainedabove.

In an example, the architecture using two resource allocation systemsmay be used to handling starvation for services, in a traffic spikescenario. For example, the architecture may leverage resources from anexisting YARN/Hadoop cluster, such as during a peak traffic scenario tolaunch application services. Separate Hadoop and service clusters may beretained, such as when the Hadoop clusters have different hardware andnetwork setups than the application cluster.

FIGS. 6-8 are example operations in a first process flow of resourceallocation in a traffic spike scenario. For example, a Mesos Slave maybe run as the primary resource manager's daemon on each node and YARN'sNode Manager may be launched as the only task for the Mesos Slave. Undernormal operation, Node Manager may run with full capacity (largeprofile), and under a spike situation the Node Manager may be verticallyscaled down (small profile).

In a traffic spike situation without the dual Mesos and YARNarchitecture, a service, for example ‘website.com/sch’, may cause theservice cluster to run at a high temperature and the service may beunable to meet the required Service Level Agreement (SLA). Without thedual architecture, the spike may not be handled, as the service ‘sch’cluster should be flexed up but there are no spare resources in Mesoscluster to perform this flex up.

In the Mesos/YARN architecture 600, illustrated in FIG. 6, the ControlPlane 602 may detect the presence of a traffic spike and make a decisionto increase the number of running instances for ‘service sch’. In thisexample, there are not enough resources available to run new ‘servicesch’ instances on node 1 (608) and node 2 (610). Accordingly, theControl Plane 602 may vertically scale down a YARN Node Manager 614 or618 using Aurora/Mesos. In doing so, the YARN Node Manager 614, forexample, may restart with fewer resources allotted to it and createextra capacity for a Mesos resource manager 604 to schedule ‘servicesch’ instances on nodes 608 and 610 under Mesos Slaves 612 and 616respectively.

FIG. 7 shows architecture 700 with YARN Node manager 714 and YARN NodeManager 718 allocated fewer resources (e.g., six CPU and six GB insteadof the eight CPU and eight GB allotted to the YARN Node Managers 614 and618 in FIG. 6). Once the traffic spike ends, the Control Plane 702 mayissue a restore flow, and may terminate the extra ‘service sch’, runningon nodes 1 and 2 (708 and 710) under Mesos Slaves 712 and 716respectively, that were launched to handle the traffic spike.

FIG. 8 shows architecture 800 after the extra ‘service sch’ are stoppedon nodes 1 and 2 (808 and 810). The YARN Node Managers 814 and 818 maythen be vertically scaled up (e.g., back to eight CPU and eight GB).

In an example, a process on the architectures 600, 700, and 800 in FIGS.6-8 may include: wait for traffic spike signal from monitoring system,retrieve scheduling data and cluster metrics from YARN resource manager(e.g., 606). The process may include, determining nodes where YARN NodeManager can be vertically scaled down (e.g., nodes 1 and 2—608 and 610).The process may include, calling aurora to vertically scale down YARNNode Manager (e.g., 614 and 618) on identified nodes (608 and 610), bychanging the running profile from large to small. The process mayinclude, waiting for monitoring system to signal that the traffic spikehas ended, and calling aurora to vertically scale up YARN Node Manager(e.g., 714 and 718) on identified nodes (e.g., 708 and 710), by changingthe running profile from small to large (e.g., restore cluster as shownin FIG. 8).

In an example, restarting YARN Node Manager may kill all its childcontainers. Although the killed child containers may be rescheduled byYARN, the work performed is lost, such as by using YARN-1336. In anotherexample, restarting YARN Node Manager may not kill all its childcontainers. Restarting a YARN Node Manager that runs a YARN AppMastermay be disruptive, as it may kill the YARN AppMaster container. Once theYARN AppMaster container is killed, YARN may kill all the childcontainers for that YARN AppMaster. The technique that identifies nodesfor vertical scale down may be configured to avoid picking nodes thatrun YARN AppMaster (e.g., best effort), such as using YARN-1489.

In various examples, a Control Plane is responsible for making importantdecisions regarding resource allocation. In an example, a Control Planemay make such decisions in a well-informed, intelligent manner. Invarious examples, the current REST API provided by Hadoop/YARN is notable to provide enough information to make smart choices about grantingor rescinding resources. A new Hadoop/YARN API may be used instead,which further exposes information from YARN'S scheduler. This new APImay give a snapshot of the Resource Requests being made by YARN AppMasters at a point in time. The new API may also be capable of exposingrequests to create “container 0”, also known as the YARN AppMaster.

In various examples, the API provides an Application level granularityof resource requests. Using the API, a user may know how much memory,how many virtual cores, or locality constraints for each application.With a richer set of data to work with, the Control Plane may be able tomake better decisions, further optimizing the use of resources in thedata center. An example YARN API is provided below:

Yarn API <resourceRequests> <MB>102400</MB> <VCores>100</VCores><appMaster><applicationId>application_1408388286628_0002</applicationId><applicationAttemptId>appattempt_1408388286628_0002_000001</applicationAttemptId> <queueName>default</queueName> <totalMB>102400</totalMB><totalVCores>100</totalVCores><numResourceRequests>1</numResourceRequests> <resourceRequests><request> <MB>1024</MB> <VCores>1</VCores> <resourceNames><resourceName>/default-rack</resourceName><resourceName>*</resourceName> <resourceName>master</resourceName></resourceNames> <numContainers>100</numContainers><relaxLocality>true</relaxLocality> <priority>20</priority> </request></resourceRequests> </appMaster> </resourceRequests>

In another example, a single cluster for Hadoop and Services/ScalingYARN may be used. Using a single cluster, a job may run anywhere in thedatacenter. In an example, a datacenter using a single cluster may haveno dedicated clusters. The datacenter with the single cluster mayhorizontally scale node managers. For example, a scenario where YARN isunable to schedule containers because it has run out of resources wouldfunction differently with a single cluster datacenter than a multiplecluster datacenter. If the datacenter has multiple clusters usingdedicated clusters, YARN may wait until enough resources are freed up toschedule pending containers. A datacenter using a single cluster may andthe new described architecture, may eliminate static partitioning andenable resource sharing. The datacenter with a single cluster may allowYARN to schedule containers without waiting. An example of a datacenterwith a single cluster is shown in FIG. 3.

Resources may be provided for YARN on demand in a single clusterdatacenter. For example, a user may submit a MapReduce job to YARN and aYARN resource manager may schedules a YARN AppMaster container on a YARNNode Manager. If YARN is unable to schedule Map and Reduce containersfor a YARN MRAppMaster because of a lack of resources, the Control Planemay detect starvation using various YARN APIs including newly introducedresource requests API (YARN-2408). In an example, Mesos and YARN may becombined to create one unified cluster per datacenter. YARN and Mesostasks may co-exist on a node, and resources may be provisioned ondemand.

FIGS. 9-13 are example operations in a second process flow of resourceallocation, according to example embodiments. FIG. 9 shows architecture900 including a Control Plane 902, Mesos resource manager 904 and YARNresource manager 906. The architecture 900 includes jobs A 920, M 922,and R 924.

FIG. 9 shows the job A 920 waiting to be scheduled. FIG. 10 shows thejob A 920 scheduled by the YARN resource manager 906 on a node 1 (908)using a YARN Node Manager 914 that may be a task of a Mesos Slave 912under the Mesos resource manager 904. In an example, the YARN resourcemanager 906 may attempt to schedule job M 922 or job R 926.

FIG. 11 shows the Control Plane 902 that may detect starvation.Starvation may occur when there are not enough resources on a node whena job is attempted to be schedule on the node. For example, when theYARN resource manager 906 attempts to schedule job M 922 or job R 926 onNode 1 (908), job A 920 may already be running under the YARN NodeManager 914 Furthermore, node 1 (908) may have insufficient resources toschedule jobs M or R (922 or 924). The Control Plane 902 may detect thisstarvation of resources, and give the Mesos resource manager 904 furtherinstructions for scheduling the jobs M 922 and R 924. The Control Plane902 may direct the Mesos resource manager 904 to preempt Service Y 918running on Node 2 (910). In an example, the Mesos resource manager 904may preempt Service Y 918 and deallocate node resources from Service Y918.

FIG. 12, in an example, shows the Mesos resource manager 904 directingthe Mesos Slave 916 to launch a YARN Node Manager 926 on node 2 (910) asa task under the Mesos Slave 916, with the YARN Node Manager 926 underthe YARN resource manager 906. The YARN Node Manager 926 may beallocated some or all of the available resources on node 2 (910). Forexample, in FIGS. 11-12, Service Y 918 is shown with node resources ofsix CPU and six GB which are deallocated by the Mesos resource manager904. The YARN Node Manager 926 is shown with four CPU and four GBallocated by the Mesos resource manager 904. In the examples in FIGS.9-13, an additional service, Service X is shown under the Mesos Slave(912) on node 1 (908). Service X may or may not be present when usingtechniques described related to these figures.

FIG. 13, in an example, shows the Control Plane 902 directing the Mesosresource manager 904 to instruct the Mesos Slave 916 on node 2 (910) toallow the YARN Node Manager 926 to broadcast available node resources tothe YARN resource manager 906. The YARN resource manager 906 mayschedule job M 922 or job R 924 to run on node 2 (910) on the YARN NodeManager 926 running as a task under the Mesos Slave 916 controlled bythe Mesos resource manager 904.

To schedule jobs M 922 or R 924, a new YARN API, such as YARN-2408 maybe implemented. The new YARN API may include Resource Requests snapshotAPI: memory, virtual cores, or locality constraint. The API may includeREST API with JSON & XML output, and may be non-intrusive, by exposingmore information from the resource manager. The API may help the ControlPlane decide Node Manager sizing.

In various examples, the Control Plane uses pre-configured policies todetermine if the starving YARN AppMasters should get resources (e.g.,business critical workload). In an example, the Control Plane maypreempt a task of lower priority, and horizontally scale a Node Manager.For example, the Service Y 918 may be preempted if it is a lowerpriority than the jobs M 922 or R 924, and the YARN Node Manager 926 maybe launched. Once the YARN Node Manager 926 is available, YARN resourcemanager 906 may start scheduling containers.

In various example, the above systems may be used by the Control Planefor horizontal scaling. For example, horizontal scaling may include,retrieving scheduling data and cluster metrics from YARN resourcemanager 906, and detecting YARN starvation using the following APIs:ResourceRequests (YARN-2408), and metrics (/ws/v1/cluster/metrics). Thescaling may include, determining a lower priority Mesos task (e.g.,Service Y 918) that may be pre-empted to free up resources to launchNode Manager, calling aurora to kill the identified task, and callingaurora to horizontally scale out the YARN Node Manager 926. In variousexamples, a vertical scaling strategy may also be used.

In an example, the Control Plane may include Mesos framework. It mayalso include a design scope including: configurations to flex up ordown, vertically or horizontally. It may include determining YARN NodeManager profile for flex up, such as small (two CPU, four GB RAM) orlarge (eight CPU, 24 GB RAM). It may also include choosing a YARN NodeManager to flex down, which may allow avoiding a YARN Node Managerrunning a YARN AppMaster container or whose child containers areimportant, such as HBase zone servers.

In various examples, the Control Plane may utilize various factors tointelligently make resource sharing decisions and the challenges theyimpose such as quotas and priorities. In various examples, quotas,priorities and other factors may mean different things for differentorganizations. There may not be a single Control Plane technique to fitthe needs of each situation. In various examples, quotas may be definedat multiple levels and may mean different things for differentworkloads. For instance, resource quota may be defined at a resourcemanager level in terms of the amount of resources each resource manageris guaranteed to possess at any time. Another way to define quotas is ata workload level, which may mean response SLA for application servicesand processing time SLA for data processing jobs. In various examples,the notion of priorities helps the Control Plane to identify workloadunits that should not be preempted. Sharing resources may improveutilization and reduce cost of operation, but, in various examples, maynot be done at cost of disruption of critical services, and reducingoverall availability.

There may be a plethora of workload groups that run across a datacenter,such as web applications, application services, database servers, batchjobs, data processing jobs, etc. Priorities may be definedhierarchically, across workload groups and within workload groups. Forexample, all web applications may be of a higher priority than all batchjobs. Within the web applications, a checkout application may be of ahigher priority than a help web application or a help web applicationmay not be a higher priority than a billing batch job. Alternatively,priorities may be defined per workload unit, where the priority ordermay be defined across workload groups, allowing one to classify abilling batch job more important than a help web application. In anexample, Aurora may be used as a framework, and thermos as an executor,although other frameworks or executors may be used interchangeably. Inan example, a Control Plane, (e.g., the system that orchestratesresource sharing between Mesos and YARN), may be made a Mesos framework,for better control.

Embodiments may be implemented in one or a combination of hardware,firmware, and software. Embodiments may also be implemented asinstructions stored on a machine-readable storage device, which may beread and executed by at least one processor to perform the operationsdescribed herein. A machine-readable storage device may include anynon-transitory mechanism for storing information in a form readable by amachine (e.g., a computer). For example, a machine-readable storagedevice may include read-only memory (ROM), random-access memory (RAM),magnetic disk storage media, optical storage media, flash-memorydevices, and other storage devices and media.

Examples, as described herein, may include, or may operate on, logic ora number of components, modules, or mechanisms. Modules may be hardware,software, or firmware communicatively coupled to one or more processorsin order to carry out the operations described herein. Modules mayhardware modules, and as such modules may be considered tangibleentities capable of performing specified operations and may beconfigured or arranged in a certain manner. In an example, circuits maybe arranged (e.g., internally or with respect to external entities suchas other circuits) in a specified manner as a module. In an example, thewhole or part of one or more computer systems (e.g., a standalone,client or server computer system) or one or more hardware processors maybe configured by firmware or software (e.g., instructions, anapplication portion, or an application) as a module that operates toperform specified operations. In an example, the software may reside ona machine-readable medium. In an example, the software, when executed bythe underlying hardware of the module, causes the hardware to performthe specified operations. Accordingly, the term hardware module isunderstood to encompass a tangible entity, be that an entity that isphysically constructed, specifically configured (e.g., hardwired), ortemporarily (e.g., transitorily) configured (e.g., programmed) tooperate in a specified manner or to perform part or all of any operationdescribed herein. Considering examples in which modules are temporarilyconfigured, each of the modules need not be instantiated at any onemoment in time. For example, where the modules comprise ageneral-purpose hardware processor configured using software; thegeneral-purpose hardware processor may be configured as respectivedifferent modules at different times. Software may accordingly configurea hardware processor, for example, to constitute a particular module atone instance of time and to constitute a different module at a differentinstance of time. Modules may also be software or firmware modules,which operate to perform the methodologies described herein.

FIG. 14 is a block diagram illustrating a machine in the example form ofa computer system 1400, within which a set or sequence of instructionsmay be executed to cause the machine to perform any one of themethodologies discussed herein, according to an example embodiment. Inalternative embodiments, the machine operates as a standalone device ormay be connected (e.g., networked) to other machines. In a networkeddeployment, the machine may operate in the capacity of either a serveror a client machine in server-client network environments, or it may actas a peer machine in peer-to-peer (or distributed) network environments.The machine may be a personal computer (PC), a tablet PC, a hybridtablet, a set-top box (STB), a personal digital assistant (PDA), amobile telephone, a web appliance, a network router, switch or bridge,or any machine capable of executing instructions (sequential orotherwise) that specify actions to be taken by that machine. Further,while only a single machine is illustrated, the term “machine” shallalso be taken to include any collection of machines that individually orjointly execute a set (or multiple sets) of instructions to perform anyone or more of the methodologies discussed herein.

Example computer system 1400 includes at least one processor 1402 (e.g.,a central processing unit (CPU), a graphics processing unit (GPU) orboth, processor cores, compute nodes, etc.), a main memory 1404 and astatic memory 1406, which communicate with each other via a link 1408(e.g., bus). The computer system 1400 may further include a videodisplay unit 1410, an alphanumeric input device 1412 (e.g., a keyboard),and a user interface (UI) navigation device 1414 (e.g., a mouse). In oneembodiment, the video display unit 1410, input device 1412 and UInavigation device 1414 are incorporated into a touch screen display. Thecomputer system 1400 may additionally include a storage device 1416(e.g., a drive unit), a signal generation device 1418 (e.g., a speaker),a network interface device 1420, and one or more sensors (not shown),such as a global positioning system (GPS) sensor, compass,accelerometer, or other sensor.

The storage device 1416 includes a machine-readable medium 1422 on whichis stored one or more sets of data structures and instructions 1424(e.g., software) embodying or utilized by any one or more of themethodologies or functions described herein. The instructions 1424 mayalso reside, completely or at least partially, within the main memory1404, static memory 1406, and/or within the processor 1402 duringexecution thereof by the computer system 1400, with the main memory1404, static memory 1406, and the processor 1402 also constitutingmachine-readable media.

While the machine-readable medium 1422 is illustrated in an exampleembodiment to be a single medium, the term “machine-readable medium” mayinclude a single medium or multiple media (e.g., a centralized ordistributed database, and/or associated caches and servers) that storethe one or more instructions 1424. The term “machine-readable medium”shall also be taken to include any tangible medium that is capable ofstoring, encoding or carrying instructions for execution by the machineand that cause the machine to perform any one or more of themethodologies of the present disclosure or that is capable of storing,encoding or carrying data structures utilized by or associated with suchinstructions. The term “machine-readable medium” shall accordingly betaken to include, but not be limited to, solid-state memories, andoptical and magnetic media. Specific examples of machine-readable mediainclude non-volatile memory, including, but not limited to, by way ofexample, semiconductor memory devices (e.g., electrically programmableread-only memory (EPROM), electrically erasable programmable read-onlymemory (EEPROM)) and flash memory devices; magnetic disks such asinternal hard disks and removable disks; magneto-optical disks; andCD-ROM and DVD-ROM disks.

The instructions 1424 may further be transmitted or received over acommunications network 1426 using a transmission medium via the networkinterface device 1420 utilizing any one of a number of well-knowntransfer protocols (e.g., HTTP). Examples of communication networksinclude a local area network (LAN), a wide area network (WAN), theInternet, mobile telephone networks, plain old telephone (POTS)networks, and wireless data networks (e.g., Wi-Fi, 3G, and 4G LTE/LTE-Aor WiMAX networks). The term “transmission medium” shall be taken toinclude any intangible medium that is capable of storing, encoding, orcarrying instructions for execution by the machine, and includes digitalor analog communications signals or other intangible medium tofacilitate communication of such software.

VARIOUS NOTES & EXAMPLES

Each of these non-limiting examples can stand on its own, or can becombined in various permutations or combinations with one or more of theother examples.

Example 1 includes the subject matter embodied by a system for managinga server cluster comprising: a first resource manager of a control planeto: schedule a first job on a first node, and attempt to schedule asecond job on the first node, and a second resource manager of thecontrol plane to: preempt, in response to the attempt to schedule thesecond job on the first node, a service on the second node, wherein theservice is allocated node resources of the second node, and deallocatethe node resources of the second node from the service, and wherein anode manager of the first resource manager on the second node broadcastsavailable node resources of the second node and wherein the firstresource manager is to schedule the second job on the second node.

In Example 2, the subject matter of Example 1 can optionally includewherein the service is run by a slave of the second resource manager.

In Example 3, the subject matter of one or any combination of Examples1-2 can optionally include wherein the node manager is a task run underthe slave of the second resource manager.

In Example 4, the subject matter of one or any combination of Examples1-3 can optionally include wherein the available node resources areresources available to the node manager.

In Example 5, the subject matter of one or any combination of Examples1-4 can optionally include wherein the available node resources are asubset of the node resources of the second node.

In Example 6, the subject matter of one or any combination of Examples1-5 can optionally include wherein the second job on the second node isrun by the node manager and the first job on the first node is run byanother node manager.

In Example 7, the subject matter of one or any combination of Examples1-6 can optionally include wherein the first node and the second nodeare on the server cluster.

In Example 8, the subject matter of one or any combination of Examples1-7 can optionally include wherein the second resource manager isfurther to reschedule the service on a third node.

Example 9, the subject matter of one or any combination of Examples 1-8can optionally include wherein the second resource manager is further toreschedule the services on the first node after the first job iscomplete.

In Example 10, the subject matter of one or any combination of Examples1-9 can optionally include wherein the second resource manager isfurther to reschedule the service on the second node after the secondjob is complete.

Example 11 includes the subject matter embodied by a method for managinga server cluster comprising: scheduling a first job on a first node,using a first resource manager, establishing a service for a secondresource manager on a second node, wherein the service is allocated noderesources of the second node, attempting to schedule a second job on thefirst node, using the first resource manager, preempting the service onthe second node, using the second resource manager, in response to theattempt to schedule the second job on the first node, deallocating thenode resources of the second node from the service, broadcasting, usinga node manager of the first resource manager, available node resourcesof the second node, and scheduling the second job on the second node,using the first resource manager.

In Example 12, the subject matter of Example 11 can optionally includewherein establishing the service includes running the service using aslave of the second resource manager.

In Example 13, the subject matter of one or any combination of Examples11-12 can optionally include further comprising running the node manageras a task under the slave of the second resource manager.

In Example 14, the subject matter of one or any combination of Examples11-13 can optionally include wherein the available node resources areresources available to the node manager.

In Example 15, the subject matter of one or any combination of Examples11-14 can optionally include further comprising rescheduling the serviceon one of: the first node after the first job is complete, the secondnode after the second job is complete, or a third node.

Example 16 includes the subject matter embodied by a machine-readablemedium including instructions for operation of a computing system, whichwhen executed by a machine, cause the computing system to: schedule afirst job on a first node, using a first resource manager, establish aservice for a second resource manager on a second node, wherein theservice is allocated node resources of the second node, attempt toschedule a second job on the first node, using the first resourcemanager, preempt the service on the second node, using the secondresource manager, in response to the attempt to schedule the second jobon the first node, deallocate the node resources of the second node fromthe service, broadcast, using a node manager of the first resourcemanager, available node resources of the second node, and schedule thesecond job on the second node, using the first resource manager.

In Example 17, the subject matter of Example 16 can optionally includewherein to establish the service includes to run the service using aslave of the second resource manager.

In Example 18, the subject matter of one or any combination of Examples16-17 can optionally include further comprising: run the node manager asa task under the slave of the second resource manager.

In Example 19, the subject matter of one or any combination of Examples16-18 can optionally include wherein the available node resources areresources available to the node manager.

In Example 20, the subject matter of one or any combination of Examples16-19 can optionally include further comprising: reschedule the serviceon one of: the first node after the first job is complete, the secondnode after the second job is complete, or a third node.

The above detailed description includes references to the accompanyingdrawings, which form a part of the detailed description. The drawingsshow, by way of illustration, specific embodiments in which theinvention can be practiced. These embodiments are also referred toherein as “examples.” Such examples can include elements in addition tothose shown or described. However, the present inventors alsocontemplate examples in which only those elements shown or described areprovided. Moreover, the present inventors also contemplate examplesusing any combination or permutation of those elements shown ordescribed (or one or more aspects thereof), either with respect to aparticular example (or one or more aspects thereof), or with respect toother examples (or one or more aspects thereof) shown or describedherein. In the event of inconsistent usages between this document andany documents so incorporated by reference, the usage in this documentcontrols.

In this document, the terms “a” or “an” are used, as is common in patentdocuments, to include one or more than one, independent of any otherinstances or usages of “at least one” or “one or more.” In thisdocument, the term “or” is used to refer to a nonexclusive or, such that“A or B” includes “A but not B,” “B but not A,” and “A and B,” unlessotherwise indicated. In this document, the terms “including” and “inwhich” are used as the plain-English equivalents of the respective terms“comprising” and “wherein.” Also, in the following claims, the terms“including” and “comprising” are open-ended, that is, a system, device,article, composition, formulation, or process that includes elements inaddition to those listed after such a term in a claim are still deemedto fall within the scope of that claim. Moreover, in the followingclaims, the terms “first,” “second,” and “third,” etc. are used merelyas labels, and are not intended to impose numerical requirements ontheir objects.

Method examples described herein can be machine or computer-implementedat least in part. Some examples can include a computer-readable mediumor machine-readable medium encoded with instructions operable toconfigure an electronic device to perform methods as described in theabove examples. An implementation of such methods can include code, suchas microcode, assembly language code, a higher-level language code, orthe like. Such code can include computer readable instructions forperforming various methods. The code may form portions of computerprogram products. Further, in an example, the code can be tangiblystored on one or more volatile, non-transitory, or non-volatile tangiblecomputer-readable media, such as during execution or at other times.Examples of these tangible computer-readable media can include, but arenot limited to, hard disks, removable magnetic disks, removable opticaldisks (e.g., compact disks and digital video disks), magnetic cassettes,memory cards or sticks, random access memories (RAMs), read onlymemories (ROMs), and the like.

The above description is intended to be illustrative, and notrestrictive. For example, the above-described examples (or one or moreaspects thereof) may be used in combination with each other. Otherembodiments can be used, such as by one of ordinary skill in the artupon reviewing the above description. The Abstract is provided to complywith 37 C.F.R. §1.72(b), to allow the reader to quickly ascertain thenature of the technical disclosure. It is submitted with theunderstanding that it will not be used to interpret or limit the scopeor meaning of the claims. Also, in the above Detailed Description,various features may be grouped together to streamline the disclosure.This should not be interpreted as intending that an unclaimed disclosedfeature is essential to any claim. Rather, inventive subject matter maylie in less than all features of a particular disclosed embodiment.Thus, the following claims are hereby incorporated into the DetailedDescription as examples or embodiments, with each claim standing on itsown as a separate embodiment, and it is contemplated that suchembodiments can be combined with each other in various combinations orpermutations. The scope of the invention should be determined withreference to the appended claims, along with the full scope ofequivalents to which such claims are entitled.

What is claimed is:
 1. A computer system for managing a server clustercomprising: one or more processors; and a machine-readable mediumincluding instructions for operation of the computer system, which whenexecuted by the one or more processors, cause the computing system toperform operations comprising: scheduling a first job on a first node,by a first resource manager of a control plane; and attempting toschedule a second job on the first node, by the first resource manager;preempting, by a second resource manager of the control plane, inresponse to the attempt to schedule the second job on the first node andin response to the control plane determining there are not enoughresources available on the first node for the second job, a service on asecond node, wherein the service is allocated node resources of thesecond node; and deallocating, by the second resource manager, the noderesources of the second node from the service; broadcasting, by a nodemanager of the first resource manager on the second node, available noderesources of the second node; and scheduling, by the first resourcemanager, the second job on the second node.
 2. The system of claim 1,wherein the service is run by a slave of the second resource manager. 3.The system of claim 2, wherein the node manager is a task run under theslave of the second resource manager.
 4. The system of claim 3, whereinthe available node resources are resources available to the nodemanager.
 5. The system of claim 1, wherein the available node resourcesare a subset of the node resources of the second node.
 6. The system ofclaim 1, wherein the second job on the second node is run by the nodemanager and the first job on the first node is run by another nodemanager.
 7. The system of claim 1, wherein the first node and the secondnode are on the server cluster.
 8. The system of claim 1, wherein thesecond resource manager is further to reschedule the service on a thirdnode.
 9. The system of claim 1, wherein the second resource manager isfurther to reschedule the services on the first node after the first jobis complete.
 10. The system of claim 1, wherein the second resourcemanager is further to reschedule the service on the second node afterthe second job is complete.
 11. A method for managing a server clustercomprising: scheduling a first job on a first node, using a firstresource manager of a control plane; attempting to schedule a second jobon the first node, using the first resource manager; preempting, by asecond resource manager of the control plane, in response to the attemptto schedule the second job on the first node and in response to thecontrol plane determining there are not enough resources available onthe first node for the second job, a service on a second node, whereinthe service is allocated node resources of the second node;deallocating, by the second resource manager, the node resources of thesecond node from the service; broadcasting, using a node manager of thefirst resource manager on the second node, available node resources ofthe second node; and scheduling, by the first resource manager, thesecond job on the second node.
 12. The method of claim 11, theoperations further comprising: establishing a service for a secondresource manager on a second node, wherein the service is allocated noderesources of the second node; wherein establishing the service includesrunning the service using a slave of the second resource manager. 13.The method of claim 12, further comprising running the node manager as atask under the slave of the second resource manager.
 14. The method ofclaim 13, wherein the available node resources are resources availableto the node manager.
 15. The method of claim 11, further comprisingrescheduling the service on one of: the first node after the first jobis complete, the second node after the second job is complete, or athird node.
 16. A machine-readable medium including instructions foroperation of a computing system, which when executed by at least oneprocessor, cause the computing system to perform operations comprising:scheduling a first job on a first node, using a first resource managerof a control lane; attempting to schedule a second job on the firstnode, using the first resource manager; preempting, by a second resourcemanager of the control plane, in response to the attempt to schedule thesecond job on the first node and in response to the control planedetermining there are not enough resources available on the first nodefor the second job, a service on a second node, wherein the service isallocated node resources of the second node; deallocating, by the secondresource manager, the node resources of the second node from theservice; broadcasting, using a node manager of the first resourcemanager on the second node, available node resources of the second node;and scheduling, by the first resource manager, the second job on thesecond node.
 17. The machine-readable medium of claim 16, the operationsfurther comprising: establishing a service for a second resource manageron a second node, wherein the service is allocated node resources of thesecond node; wherein establishing the service includes running theservice using a slave of the second resource manager.
 18. Themachine-readable medium of claim 17, the operations further comprising:running the node manager as a task under the slave of the secondresource manager.
 19. The machine-readable medium of claim 18, whereinthe available node resources are resources available to the nodemanager.
 20. The machine-readable medium of claim 16, the operationsfurther comprising: rescheduling the service on one of: the first nodeafter the first job is complete, the second node after the second job iscomplete, or a third node.